public class TowSum {
    public int[] code(int[] price, int target) {
        int left = 0, right = price.length - 1;

        while (left < right){
            if (price[left] + price[right] > target){
                right--;
            }else if (price[left] + price[right] < target){
                left++;
            }else{
                return new int[]{price[left], price[right]};
            }
        }

        return null;
    }

    public static void main(String[] args){
    }
}
